<%-- 
    Document   : halamanDaftarPenelitian
    Created on : Sep 18, 2012, 1:47:31 PM
    Author     : user
--%>

<%@page import="java.util.List"%>
<%@page import="java.util.List"%>
<%@page import="Entity.Penelitian"%>
<%@page import="java.util.Date"%>
<%@page import="java.util.Calendar"%>
<!DOCTYPE html>
<%@include file="../header.jsp"%>

<!-- start content-outer ........................................................................................................................START -->
<div id="content-outer">
    <!-- start content -->
    <div id="content">

        <!--  start page-heading -->
        <div id="page-heading">
            <h1>Daftar Penawaran PPM Untuk Dosen</h1>
        </div>
        <!-- end page-heading -->

        <table border="0" width="100%" cellpadding="0" cellspacing="0" id="content-table">
            <tr>
                <th rowspan="3" class="sized"><img src="images/shared/side_shadowleft.jpg" width="20" height="300" alt="" /></th>
                <th class="topleft"></th>
                <td id="tbl-border-top">&nbsp;</td>
                <th class="topright"></th>
                <th rowspan="3" class="sized"><img src="images/shared/side_shadowright.jpg" width="20" height="300" alt="" /></th>
            </tr>

            <tr>
                <td id="tbl-border-left"></td>
                <td>
                    <!--  start content-table-inner ...................................................................... START -->
                    <div id="content-table-inner">
                        
                        <!--  start table-content  -->


                        <div id="table-content">
                            <div id="link-tambah">
                            <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td class="tambah-left"><a href="tambahPenawaranPpmDosen"><strong>Tambah Penawaran PPM</strong></a></td>
                                    <td class="tambah-right"><a href="tambahPenawaranPpmDosen"><img src="images/table/plus.gif"   alt="" /></a></td>
                                </tr>
                                <tr>
                                    <td>&nbsp;</td>
                                    <td>&nbsp;</td>
                                </tr>
                            </table>
                        </div>
                        <%
                            String pesan = (String) request.getAttribute("pesan");
                            String isiPesan;
                            if (pesan != null) {
                                if (pesan.equals("sukses")) {
                                    isiPesan = (String) request.getAttribute("isiPesan");

                        %>            
                        <!--  start message-green -->
                        <div id="message-green">
                            <table border="0" width="100%" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td class="green-left"><strong><% out.print(isiPesan);%></strong></td>
                                    <td class="green-right"><a class="close-green"><img src="images/table/icon_close_green.gif"   alt="" /></a></td>
                                </tr>
                            </table>
                        </div>
                        <!--  end message-green -->
                        <%
                        } else if (pesan.equals("gagal")) {
                            isiPesan = (String) request.getAttribute("isiPesan");

                        %>
                        <!--  start message-red -->
                        <div id="message-red">
                            <table border="0" width="100%" cellpadding="0" cellspacing="0">
                                <tr>
                                    <td class="red-left"><strong><% out.print(isiPesan);%></strong></td>
                                    <td class="red-right"><a class="close-red"><img src="images/table/icon_close_red.gif"   alt="" /></a></td>
                                </tr>
                            </table>
                        </div>
                        <!--  end message-green -->
                        <%
                                }
                            }
                        %>

                            <SCRIPT TYPE="text/javascript">
                                <!--
                                function popup(mylink, windowname)
                                {
                                    if (! window.focus)return true;
                                    var href;
                                    if (typeof(mylink) == 'string')
                                        href=mylink;
                                    else
                                        href=mylink.href;
                                    window.open(href, windowname, 'width=1000,height=550,scrollbars=yes');
                                    return false;
                                }
                                //-->
                            </SCRIPT>		 		

                            <!--  start product-table ..................................................................................... -->
                            <form id="mainform" action="">
                                <table border="0" width="100%" cellpadding="0" cellspacing="0" id="product-table">
                                    <tr>
                                        <th class="table-header-repeat line-left" ><a href="">No.</a>
                                        <th class="table-header-repeat line-left"><a href="#">Topik Penawaran PPM</a>	</th>
                                        <th class="table-header-repeat line-left"><a href="#">Lingkup Informasi Penawaran PPM</a>	</th>
                                        <th class="table-header-repeat line-left minwidth-1"><a href="#">Batas Pendaftaran</a></th>
                                        <th class="table-header-options line-left"><a href="">Pilihan</a></th>
                                    </tr>
                                   
                                    <c:if test="${empty daftarPenawaranPpm}" >
                                        <tr>
                                        <td colspan="8" align="center" bordercolor="#FF0000" bgcolor="#FF0000"><strong>Data Penawaran PPM Tidak Ada</strong>
                                        </td>
                                        </tr>   
                                    </c:if>
                                    <%
                                    int i = 1;
                                    %>               
                                    <c:forEach items="${daftarPenawaranPpm}" var="penawaranPpm">
                                        <tr 
                                            <% 
                                            
                                            if (i % 2 == 0) {
                                                    out.println("class='alternate-row'");
                                                }%>
                                            >
                                            <td align="center">
                                                <%
                                                    out.print(i);
                                                    i++;
                                                %>
                                            </td>
                                            <td>${penawaranPpm.topik}</td>
                                            <td>
                                                <c:if test="${penawaranPpm.sumberInformasi == '1'}" > Penawaran PPM dari Lingkup Internal Jurusan</c:if>
                                                <c:if test="${penawaranPpm.sumberInformasi == '2'}" > Penawaran PPM dari LPPM</c:if>
                                            </td>
                                            <td><fmt:parseDate value="${penawaranPpm.batasPendaftaran}" var="parsedTanggalBatas" pattern="yyyy-MM-dd" />
                                                <fmt:formatDate type="date" dateStyle="long" value="${parsedTanggalBatas}"/> 
                                                </td>                                          
                                            <td class="options-width">
                                                <a href="detailPenawaranPpmDosen?noPenawaran=${penawaranPpm.idPenawaran}" title="Edit">[Detail]</a>
                                                <a href="ubahPenawaranPpmDosen?noPenawaran=${penawaranPpm.idPenawaran}" title="Edit">[Ubah]</a>
                                                <a href="hapusPenawaranPpmDosen?noPenawaran=${penawaranPpm.idPenawaran}" onClick="return confirm('Apakah anda yakin untuk menghapus?')" title="Hapus" >[Hapus]</a>
                                            </td>
                                        </tr>

                                    </c:forEach>
                                    
                                    
                                    

                                </table>
                                <!--  end product-table................................... --> 
                            </form>
                        </div>
                        <!--  end content-table  -->

                        <!--  start paging..................................................... -->
                        <table border="0" cellpadding="0" cellspacing="0" id="paging-table">
                            <tr>
                                <td>
                                    <a href="" class="page-far-left"></a>
                                    <a href="" class="page-left"></a>
                                    <div id="page-info">Halaman <strong>1</strong> / 15</div>
                                    <a href="" class="page-right"></a>
                                    <a href="" class="page-far-right"></a>
                                </td>
                                <td>
                                    <select  class="styledselect_pages">
                                        <option value="">Jumlah baris</option>
                                        <option value="">1</option>
                                        <option value="">2</option>
                                        <option value="">3</option>
                                    </select>
                                </td>
                            </tr>
                        </table>
                        <!--  end paging................ -->

                        <div class="clear"></div>

                    </div>
                    <!--  end content-table-inner ............................................END  -->
                </td>
                <td id="tbl-border-right"></td>
            </tr>
            <tr>
                <th class="sized bottomleft"></th>
                <td id="tbl-border-bottom">&nbsp;</td>
                <th class="sized bottomright"></th>
            </tr>
        </table>
        <div class="clear">&nbsp;</div>

    </div>
    <!--  end content -->
    <div class="clear">&nbsp;</div>
</div>
<!--  end content-outer........................................................END -->

<div class="clear">&nbsp;</div>
<%@include file="../footer.jsp"%>
